Why R

R is a popular language, especially in data science and statistics.

This can be seen in the TIOBE Index for August 2020.

As well as the PYPL index from 2023.

It has lots of strengths:


Introduction to RStudio

RStudio by default has four main quadrants as shown below. The layout is customisable, as is the background.

When you load RStudio the syntax editor will not be open. Try and open one just like as shown below.


Using R markdown

For these workshops we will be using R Markdown. It allows you to have text (with simple formatting) and chunks of R code.

To run code in a code chunk either press the green play button or press Ctrl + Enter (or Cmd + Enter on Mac).


Information on how the session is run

One hour exercise based session with tutor support. You will be given example code for a problem, then given a related exercise to complete.

Why this style?

  • Online training is tiring so keeping the sessions to one hour
  • No or limited demonstrations provided in order to provide more real world experience - you have a problem and you look up how to solve it, adapting example code
  • Trainer support to guide through process of learning

We will be working in pairs:

  • One shares the screen and the other requests remote control.
  • Take turns on who types for each exercise.
  • Share markdown file at end of session via chat
  • If possible have your camera on when doing the paired work.

What to do when getting stuck:

  1. Ask your team members
  2. Search online:
  1. Don’t struggle too long looking online, ask the trainer if you can’t find a solution!